package utils

import (
	"github.com/spf13/viper"
	"os"
)

func NewConfigRead() *viper.Viper {
	v := viper.New()
	dir, _ := os.Getwd()
	v.SetConfigFile(dir + "/config/config.json")
	v.SetConfigType("json")
	err := v.ReadInConfig()
	if err != nil {
		panic(err)

	}

	//fmt.Println(v.GetString("redis.add"))
	return v
}
